import request from "@/api/config/request_v3";

/**
 * 发送手机号验证码
 * @param phone
 */
export const sendCode = (phone: string) => request.get(`/api/user/passport/sendCode/${phone}`)
/**
 * 注册
 * @param data
 */
export const registry = (data: {
	phone: string,
	password: string,
	code: string
}) => request.post('/api/user/passport/register', data)

/**
 * 登录
 * @param data
 */
export const login = (data: {
	phone: string,
	password: string
}) => request.post('/api/user/passport/login', data)
/**
 * 获取用户信息
 */
export const getUserInfo = () => request.get('/api/user/passport/auth/getUserInfo')
/**
 * 退出登录
 */
export const logout = () => request.get('/api/user/passport/logout')